//
// FidelityTracker.cs
//
// Copyright (C) 2008 Lukas Lipka <lukaslipka@gmail.com>
//

using System;

using Hal;
using Dashboard.Engine;

namespace Dashboard.Engine.Fidelity {
	
	public class FidelityTracker : IService {

		private Store store = new Store ();

		public void Initialize ()
		{
			Engine.Log.Debug ("Starting Fidelity WPS tracking");
			
			store.Initialize ();

			IScanner scanner = new IwTools.IwList ();

			//Context context = new Context ();
			//Manager manager = new Manager (context);
			//
			//foreach (Device device in manager.FindDeviceByCapability ("net.80211")) {
			//	Engine.Log.Debug ("Found card on '{0}' with wireless capability", device.GetPropertyString ("net.interface"));
			//}
			
			foreach (Network network in scanner.Scan ()) {
				Engine.Log.Debug ("Current location network: {0} ({1})", network.Essid, network.Mac);
			}
		}

		public void Dispose ()
		{
			Engine.Log.Debug ("Stopping Fidelity WPS tracking");

			store.Dispose ();
		}
	}
}
